package com.ctg.itrdc.imageconsole.data.dto;

import java.io.Serializable;

import com.ctg.itrdc.imageconsole.data.dto.BaseDTO;
import com.ctg.itrdc.imageconsole.data.entity.DockerAppType;


public class DockerAppTypeDTO extends BaseDTO implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1044828793167257499L;

	private Long id;
	
	private String appName;

	private String tenantCode;

	/**
	 * 归类规则
	 */
	private String rule;

	/**
	 * 概述
	 */
	private String content;
	
	private int dockerImageFileCount;
	
	private String[] dockerImageFileIds;
	
	private Long appTypeId;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getRule() {
		return rule;
	}

	public void setRule(String rule) {
		this.rule = rule;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getDockerImageFileCount() {
		return dockerImageFileCount;
	}

	public void setDockerImageFileCount(int dockerImageFileCount) {
		this.dockerImageFileCount = dockerImageFileCount;
	}

	public String[] getDockerImageFileIds() {
		return dockerImageFileIds;
	}

	public void setDockerImageFileIds(String[] dockerImageFileIds) {
		this.dockerImageFileIds = dockerImageFileIds;
	}

	public Long getAppTypeId() {
		return appTypeId;
	}

	public void setAppTypeId(Long appTypeId) {
		this.appTypeId = appTypeId;
	}

	public DockerAppTypeDTO() {}
	
	public DockerAppTypeDTO(DockerAppType dockerAppType, int dockerImageFileCount, 
			String[] dockerImageFileIds) {
		this.id = dockerAppType.getId();
		this.appName = dockerAppType.getAppName();
		this.tenantCode = dockerAppType.getTenantCode();
		this.rule = dockerAppType.getRule();
		this.content = dockerAppType.getContent();
		super.setCreateTime(dockerAppType.getCreateTime());
		super.setCreateUserId(dockerAppType.getCreateUserId());
		super.setLastUpdateTime(dockerAppType.getLastUpdateTime());
		super.setLastUpdateUserId(dockerAppType.getLastUpdateUserId());
		this.dockerImageFileCount = dockerImageFileCount;
		this.dockerImageFileIds = dockerImageFileIds;
	}

	public DockerAppType getDockerAppType() {
		DockerAppType dockerAppType = new DockerAppType();
		dockerAppType.setId(id);
		dockerAppType.setAppName(appName);
		dockerAppType.setTenantCode(tenantCode);
		dockerAppType.setRule(rule);
		dockerAppType.setContent(content);
		dockerAppType.setCreateTime(super.getCreateTime());
		dockerAppType.setCreateUserId(super.getCreateUserId());
		dockerAppType.setLastUpdateTime(super.getLastUpdateTime());
		dockerAppType.setLastUpdateUserId(super.getLastUpdateUserId());
		return dockerAppType;
	}

	public String getTenantCode() {
		return tenantCode;
	}

	public void setTenantCode(String tenantCode) {
		this.tenantCode = tenantCode;
	}
}

